from django.db import models

class UploadLog(models.Model):
  app_id = models.CharField(blank=False, null=False, unique=True, max_length=60)
  data_file = models.CharField(blank=False, null=False, max_length=60)
  
  last_uploaded = models.DateTimeField(auto_now=True)
  batch_size = models.IntegerField(default=10)
  where = models.IntegerField(default=0)
  total = models.IntegerField(default=0)
  
  def __str__(self) :
    return '%s:%i uploaded'%(self.app_id, self.total)
